// @ts-ignore
/* eslint-disable */
import request from '@/request'

/** analyzeFullProcessInterviewAnalyze GET /api/full/interview/analyze */
export async function analyzeFullProcessInterviewAnalyzeUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.analyzeFullProcessInterviewAnalyzeUsingGETParams,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean_>('/api/full/interview/analyze', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  })
}

/** checkExamAnalyzeStatusAndJudge GET /api/full/interview/check/examAnalyzeStatus/judge */
export async function checkExamAnalyzeStatusAndJudgeUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.checkExamAnalyzeStatusAndJudgeUsingGETParams,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean_>('/api/full/interview/check/examAnalyzeStatus/judge', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  })
}

/** checkHrInterviewAnalyzeStatusAndJudge GET /api/full/interview/check/hrInterviewAnalyzeStatus/judge */
export async function checkHrInterviewAnalyzeStatusAndJudgeUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.checkHrInterviewAnalyzeStatusAndJudgeUsingGETParams,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean_>(
    '/api/full/interview/check/hrInterviewAnalyzeStatus/judge',
    {
      method: 'GET',
      params: {
        ...params,
      },
      ...(options || {}),
    }
  )
}

/** checkResumeAnalyzeStatusAndJudge GET /api/full/interview/check/resumeAnalyzeStatus/judge */
export async function checkResumeAnalyzeStatusAndJudgeUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.checkResumeAnalyzeStatusAndJudgeUsingGETParams,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean_>('/api/full/interview/check/resumeAnalyzeStatus/judge', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  })
}

/** checkTecInterviewAnalyzeStatusAndJudge GET /api/full/interview/check/tecInterviewAnalyzeStatus/judge */
export async function checkTecInterviewAnalyzeStatusAndJudgeUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.checkTecInterviewAnalyzeStatusAndJudgeUsingGETParams,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean_>(
    '/api/full/interview/check/tecInterviewAnalyzeStatus/judge',
    {
      method: 'GET',
      params: {
        ...params,
      },
      ...(options || {}),
    }
  )
}

/** deleteFullProcessInterview GET /api/full/interview/delete */
export async function deleteFullProcessInterviewUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.deleteFullProcessInterviewUsingGETParams,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean_>('/api/full/interview/delete', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  })
}

/** generateFullProcessInterview GET /api/full/interview/generate */
export async function generateFullProcessInterviewUsingGet(options?: { [key: string]: any }) {
  return request<API.BaseResponseLong_>('/api/full/interview/generate', {
    method: 'GET',
    ...(options || {}),
  })
}

/** generateExamWithFull POST /api/full/interview/generate/exam */
export async function generateExamWithFullUsingPost(
  body: API.ExamGenerateRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseLong_>('/api/full/interview/generate/exam', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** generateHrInterviewWithFull POST /api/full/interview/generate/hr/interview */
export async function generateHrInterviewWithFullUsingPost(
  body: API.InterviewGenerateRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseLong_>('/api/full/interview/generate/hr/interview', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** generateTecInterviewWithFull POST /api/full/interview/generate/tec/interview */
export async function generateTecInterviewWithFullUsingPost(
  body: API.InterviewGenerateRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseLong_>('/api/full/interview/generate/tec/interview', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** getFullProcessInterviewAnalyzeResult GET /api/full/interview/get/analyze/result */
export async function getFullProcessInterviewAnalyzeResultUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getFullProcessInterviewAnalyzeResultUsingGETParams,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseGetFullProcessInterviewAnalyzeResultResponse_>(
    '/api/full/interview/get/analyze/result',
    {
      method: 'GET',
      params: {
        ...params,
      },
      ...(options || {}),
    }
  )
}

/** fullInterviewNextStep GET /api/full/interview/next/step */
export async function fullInterviewNextStepUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.fullInterviewNextStepUsingGETParams,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean_>('/api/full/interview/next/step', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  })
}

/** uploadResume POST /api/full/interview/upload */
export async function uploadResumeUsingPost(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.uploadResumeUsingPOSTParams,
  body: {},
  file?: File,
  options?: { [key: string]: any }
) {
  const formData = new FormData()

  if (file) {
    formData.append('file', file)
  }

  Object.keys(body).forEach((ele) => {
    const item = (body as any)[ele]

    if (item !== undefined && item !== null) {
      if (typeof item === 'object' && !(item instanceof File)) {
        if (item instanceof Array) {
          item.forEach((f) => formData.append(ele, f || ''))
        } else {
          formData.append(ele, JSON.stringify(item))
        }
      } else {
        formData.append(ele, item)
      }
    }
  })

  return request<API.BaseResponseLong_>('/api/full/interview/upload', {
    method: 'POST',
    params: {
      ...params,
    },
    data: formData,
    requestType: 'form',
    ...(options || {}),
  })
}

/** getFullProcessInterviewList GET /api/full/interview/user/list */
export async function getFullProcessInterviewListUsingGet(options?: { [key: string]: any }) {
  return request<API.BaseResponseListFullProcessInterview_>('/api/full/interview/user/list', {
    method: 'GET',
    ...(options || {}),
  })
}
